#pragma once


#include <XnCppWrapper.h>
#include <vector>
#include "utils.h"

using namespace xn;

class CSkeleton
{
public:
	CSkeleton();
	~CSkeleton();
	void setConf(XnConfidence newConf) {minConf = newConf;}
	void SetWin(int win_sizeX, int win_sizeY) {winX = win_sizeX; winY = win_sizeY;}
	bool IsProgMode() {return progMode;}
	void addpt(XnSkeletonJoint j, XnSkeletonJointPosition p);
	std::vector<float> EvalPts(); //Pass in smoothness, etc, by ref? Or just return a vector with the new points
	// This will depend on where they're being kept...

	void Draw();

private:
	int winX, winY; //dimensions of window
	std::vector< XnSkeletonJointPosition > RH, LH, H, T; //right, left hands, head, torso

	std::vector< pt > pts;//Must correspond directly to the number of points in above vectors.
	//Might need more than one vector if RH/LH/H/T for some reason don't have the same # of points
	//Look at utils -> pt for more info

	int maxPts;
	XnConfidence minConf;
	bool prevLocValid;
	Vector3df avgLoc;

	float smooth; //0.0 = jagged, 1.0 = smooth
	float size; //0.0 = a single flat line, 1.0 = a lot of deviation from the line
	float segs; //# of segments... should this also be 0.0-1.0?
	float tension; //0.0 = little tension, 1.0 = much tension... for use in determining minor
	float change; //Based on general location change... change the key/chord? Let the player decide this. 
	float volume; //How big the movements are
	float duration; //How long the notes should be
	float octave; //Center octave. Default = 5, min/max = 0/10.

	float smW, szW, sgW, tnW, chW, vlW, drW; //Weights for these variables

	int testCount; //Probably don't need anymore

	bool progMode;
};